import request from '../utils/request'
/**
 *使用验证码登录
 * @param {String} mobile - 手机号
 */
export const useMobileLogin = (mobile) => {
  return request('/register/code', 'get', { mobile })
}
/**
 *登录
 * @param {String} mobile - 手机号
 */
export const Login = ({ mobile, code }) => {
  return request('/login/code', 'post', { mobile, code })
}
/**
 *使用账号密码登录
 *
 */
export const useAccountLogin = ({ account, password }) => {
  return request('/login', 'post', { account, password })
}
